Exporting a Word Table from DOORS

Hello,

I have had some experience with DOORS and DXL scripts, but this is my first forum post. I've been tasked with trying to adjust or "fix" the built in MS Word export script. The issue is that I have some modules that contain a MS Word table that was pasted into some DOORS objects. When I export the module back to Word, the alignment and format of the table loses it's structure, looking messy such as follows:

Heading 1 Heading 2 Heading 3
Cell Text 1 Cell Text 2 Cell Text 3
Item 1 Item 2 Item 3

My goal is to be able to retain the table grid with the proper alignment. I'm not looking to repaste the tables if possible. Any suggestions would be appreciated.

Thanks,

Mike Wallen
mike_wallen - Fri Mar 16 16:05:04 EDT 2012

Re: Exporting a Word Table from DOORS
SystemAdmin - Sun Mar 18 02:02:45 EDT 2012

If I've understood this correctly, sounds like a table from MSWord has been copied & pasted straight into the Object Text attribute in DOORS. Whilst this seems to work, the bottom line is that DOORS does not support tables entered in this fashion.

Since about DOORS version 6, DOORS has been capable of recognising and displaying content that uses Rich Text Format (RTF) control words, such as those RTF control words that define a table structure. The problem is that DOORS does not provide any table management tools, as you would find in MSWord, for managing tables embedded into an object attribute in this way.

When it comes to exporting to MSWord, there is obviously something wrong with how DOORS passes back the RTF code for the table resulting in the sort of problem that you're experiencing. So the only way I can see this being fixed is to get very medieval with the DXL in the MSWord exporter so that it passes the correct & compatible RTF code for the table to MSWord - not impossible, but a tough gig. You will need to know the RTF standard, the DOORS RTF library functions and in particular, DOORS OLE Automation Methods.

Perhaps there is an easier way - the general convention when it comes to handling tables within DOORS is to insert tables as embedded MSWord \ MSExcel OLE objects rather than use the native DOORS Table feature, or in your case, rather than paste them in directly from MSWord. It might just be easier to remove and migrate these tables into embedded MSWord OLE objects instead, then they should export to MSWord without any problem.


Paul Miller
Melbourne, Australia

Re: Exporting a Word Table from DOORS
David_G_Bond - Mon Mar 19 11:32:19 EDT 2012

SystemAdmin - Sun Mar 18 02:02:45 EDT 2012
If I've understood this correctly, sounds like a table from MSWord has been copied & pasted straight into the Object Text attribute in DOORS. Whilst this seems to work, the bottom line is that DOORS does not support tables entered in this fashion.

Since about DOORS version 6, DOORS has been capable of recognising and displaying content that uses Rich Text Format (RTF) control words, such as those RTF control words that define a table structure. The problem is that DOORS does not provide any table management tools, as you would find in MSWord, for managing tables embedded into an object attribute in this way.

When it comes to exporting to MSWord, there is obviously something wrong with how DOORS passes back the RTF code for the table resulting in the sort of problem that you're experiencing. So the only way I can see this being fixed is to get very medieval with the DXL in the MSWord exporter so that it passes the correct & compatible RTF code for the table to MSWord - not impossible, but a tough gig. You will need to know the RTF standard, the DOORS RTF library functions and in particular, DOORS OLE Automation Methods.

Perhaps there is an easier way - the general convention when it comes to handling tables within DOORS is to insert tables as embedded MSWord \ MSExcel OLE objects rather than use the native DOORS Table feature, or in your case, rather than paste them in directly from MSWord. It might just be easier to remove and migrate these tables into embedded MSWord OLE objects instead, then they should export to MSWord without any problem.


Paul Miller
Melbourne, Australia

One option would be to format the table after it is exported. It will be the last table, so use the OleAutoObject interface to send VBA commands to word to get the last OLE in Word and format the table. If it is an OLE, the the OLE can be activated, selected, and pasted to replace the OLE, then the table can be formatted.

  • David Bond

Re: Exporting a Word Table from DOORS
mike_wallen - Thu Apr 19 11:07:29 EDT 2012

David_G_Bond - Mon Mar 19 11:32:19 EDT 2012
One option would be to format the table after it is exported. It will be the last table, so use the OleAutoObject interface to send VBA commands to word to get the last OLE in Word and format the table. If it is an OLE, the the OLE can be activated, selected, and pasted to replace the OLE, then the table can be formatted.

  • David Bond

I suspected this would be a rather difficult doing. I'm waiting to get ahold of Sodius before trying to dissect Word DXL. If I make any break throughs, I'll be sure to share.

Re: Exporting a Word Table from DOORS
SystemAdmin - Thu Apr 19 13:35:16 EDT 2012

mike_wallen - Thu Apr 19 11:07:29 EDT 2012
I suspected this would be a rather difficult doing. I'm waiting to get ahold of Sodius before trying to dissect Word DXL. If I make any break throughs, I'll be sure to share.

DOORS uses Rich Text Format (RTF).

There is a subset of RTF that DOORS can display.

There is a smaller subset that DOORS provides tools to operate on (or create with the DOORS GUI).

DOORS does not provide tools to operate on RTF tables.

If you want a table in DOORS that you want to operate on with the DOORS GUI I think the best bet is to convert the RTF table to a native DOORS table.